package com.tank.action.itemsObjct;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.ActionSupport;
import com.tank.bean.User;
import com.tank.bean.item.Product;
import com.tank.bean.product.ParentType;
import com.tank.service.ItemsManageService;

public class MainAction extends ActionSupport{
	
	private List<ParentType> itemsType = new ArrayList<ParentType>();
	private List<Product> newProducts = new ArrayList<Product>();
	private List<Product> hotProducts = new ArrayList<Product>();
	private List<User> bigGunUsers = new ArrayList<User>();
	@Autowired
	private ItemsManageService itemsManageService;
	@Override
	public String execute() throws Exception {
		itemsType = itemsManageService.queryItemsType();
		newProducts = itemsManageService.queryPublicItemsMessage();
		hotProducts = itemsManageService.queryHotItems();
		bigGunUsers = itemsManageService.queryDarenList();
		return SUCCESS;
	}
	public List<ParentType> getItemsType() {
		return itemsType;
	}
	public void setItemsType(List<ParentType> itemsType) {
		this.itemsType = itemsType;
	}
	public List<User> getBigGunUsers() {
		return bigGunUsers;
	}
	public void setBigGunUsers(List<User> bigGunUsers) {
		this.bigGunUsers = bigGunUsers;
	}
	public List<Product> getNewProducts() {
		return newProducts;
	}
	public void setNewProducts(List<Product> newProducts) {
		this.newProducts = newProducts;
	}
	public List<Product> getHotProducts() {
		return hotProducts;
	}
	public void setHotProducts(List<Product> hotProducts) {
		this.hotProducts = hotProducts;
	}
	
	
}
